package io.bdmc.modules.bss.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.bdmc.common.utils.MyPage;
import io.bdmc.modules.bss.entity.DeviceMachineOpmModule;
import io.bdmc.modules.bss.mapper.DeviceMachineOpmModuleMapper;
import io.bdmc.modules.bss.service.IDeviceMachineOpmModuleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 黄露
 * @since 2021-05-21
 */
@Service
public class DeviceMachineOpmModuleServiceImpl extends ServiceImpl<DeviceMachineOpmModuleMapper, DeviceMachineOpmModule> implements IDeviceMachineOpmModuleService {
    @Autowired
    DeviceMachineOpmModuleMapper opmModuleMapper;

    @Override
    public MyPage<DeviceMachineOpmModule> mySelectPage(MyPage<DeviceMachineOpmModule> myPage) {
        return opmModuleMapper.mySelectPage(myPage);
    }

    @Override
    public List<DeviceMachineOpmModule> selectByMachineOpmId(Integer machineOpmId) {
        QueryWrapper<DeviceMachineOpmModule> w1 = new QueryWrapper<>();
        w1.eq("machine_opm_id",machineOpmId);
        return list(w1);
    }
}
